package top.infopub.security.core;


import org.apache.shiro.cache.AbstractCacheManager;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;


/**
 * 重定义shiro的 cache管理器
 * </br>缓存控制器，来管理如用户、角色、权限等的缓存
 * @author Awoke
 * @version 2018年9月17日
 * @see ShiroRedisCacheManager
 * @since
 */
public class ShiroRedisCacheManager extends AbstractCacheManager {

    private ShiroRedisCache<String, Object> shiroRedisCache;

    @SuppressWarnings("rawtypes")
    @Override
    protected Cache createCache(String cacheName)
        throws CacheException {
        return shiroRedisCache;
    }

    public ShiroRedisCache<String, Object> getShiroRedisCache() {
        return shiroRedisCache;
    }

    public void setShiroRedisCache(ShiroRedisCache<String, Object> shiroRedisCache) {
        this.shiroRedisCache = shiroRedisCache;
    }
    
}